﻿namespace CVsharp.Jquery.DWZ
{
    public static class JosnMsg
    {
        public static object ResultOK(string message)
        {
            return new
            {
                statusCode = "200",
                message
            };
        }
        public static object ResultOK(string message, string navTabId)
        {
            return new
            {
                statusCode = "200",
                message,
                navTabId
            };
        }
        public static object ResultOKCloseCurrent(string message, string navTabId)
        {
            return new
            {
                statusCode = "200",
                message,
                navTabId,
                callbackType = "closeCurrent"
            };
        }
        public static object ResultFail(string message)
        {
            return new
            {
                statusCode = "300",
                message,
            };
        }
        public static object ResultFail(string message, string navTabId)
        {
            return new
            {
                statusCode = "300",
                message,
                navTabId
            };
        }
        public static object ResultFailCloseCurrent(string message, string navTabId)
        {
            return new
            {
                statusCode = "300",
                message,
                navTabId,
                callbackType = "closeCurrent"
            };
        }
    }
}
